from sqlalchemy import Table, Column, String, Boolean, MetaData


def get():
    metadata = MetaData()
    # Enum of usernames
    #
    # login - login name of user
    # username - meaningful name of user
    # md5pwd - md5 hashed password
    # token - token string used for request authenticating
    # admin - mark if user is admin. Only one admin is permitted.
    Table('users', metadata,
          Column('login', String, primary_key=True),
          Column('username', String, nullable=False),
          Column('md5pwd', String, nullable=False),
          Column('token', String, nullable=True, unique=True),
          Column('admin', Boolean, nullable=False))

    return metadata
